Skip to content

refactor: rename persistence -> platform_store + v1 cleanup (#599 PR3/3)#604

Merged
frankbria merged 3 commits into
mainfrom
refactor/issue-599-platform-store-rename
May 29, 2026
Merged

refactor: rename persistence -> platform_store + v1 cleanup (#599 PR3/3)#604
frankbria merged 3 commits into
mainfrom
refactor/issue-599-platform-store-rename

Conversation

@frankbria

@frankbria frankbria commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

Final PR (3 of 3) for #599 — closes the v1 cleanup series. Renames the slim control-plane store to its real role, refreshes CLAUDE.md, and removes the last v1 stragglers.

Net: 43 files changed, +49 / −2,411.

  • git mv codeframe/persistence → codeframe/platform_store (the slim control-plane store: auth, api keys, audit logs, interactive sessions, token usage).
  • Updated all 31 codeframe.persistence imports across codeframe/, tests/, and scripts/. Also updated active docs: CONTRIBUTING.md, PRD.md, TESTING.md, and the inline python check in .github/workflows/test.yml.
  • CLAUDE.md: dropped the stale codeframe/server/ references (the dir does not exist after the v1 cleanup) — removed the "Legacy can be read" rule + the matching v2-architecture bullet; replaced the server/ line in the repo-structure tree with platform_store/; refreshed the tests/agents/ note now that only dependency_resolver remains.
  • Test stragglers (close-out cleanup):
    • Removed orphan sample_project_config fixture from tests/conftest.py (claude-bot note from PR1; zero surviving consumers).
    • Deleted the 5 remaining refactor: remove orphaned v1 web layer (routers + services) #597-era v1 tests that were collect-ignored and referenced removed code: tests/api/{test_project_creation_api,test_workspace_cleanup}, tests/auth/{test_api_key_endpoints,test_authorization_integration,test_dual_auth}.
    • Un-ignored tests/api/test_health_endpoint.py and fixed one stale v1 assertion ("database" in data) — the field was removed from the v2 /health response; the other five assertions match the live contract and restore explicit /health test coverage.
    • Emptied the root tests/conftest.py collect_ignore.
    • Deleted 3 v1 ui router tests still listed in tests/ui/conftest.py collect_ignore (test_deployment_mode, test_project_api, test_session_router); left the 2 websocket entries (pre-existing, reference live kept managers).
  • Deleted tracked stale coverage artifacts.

Historical archives (claudedocs/, legacydocs/, specs/, sprints/, testsprite_tests/) are intentionally untouched — they are frozen point-in-time snapshots, like docs/archive/.

Acceptance Criteria (PR3 + remaining #599 criteria)

  • codeframe/persistence/ renamed to codeframe/platform_store/; all imports updated
  • CLAUDE.md repo-structure section updated; no stale server/ reference
  • codeframe serve boots (TestClient lifespan /health → 200)
  • pytest --collect-only clean; uv run pytest -m v2 green
  • cf --help + golden-path work; ruff + mypy clean

With PR1 (#602) + PR2 (#603) merged, this PR completes every issue #599 criterion: no legacy multi-agent classes; core/project.py + dead dirs removed; plan engine documented as kept; Database exposes only control-plane methods; rename done; CLAUDE.md refreshed.

Test Plan

  • pytest --collect-only clean (3460 tests)
  • uv run pytest -m v2 green (2824 passed, 636 deselected, 0 failed)
  • App boots: TestClient /health → 200
  • cf --help + cf status work
  • ruff check codeframe/ clean; mypy codeframe/ clean (181 files)
  • tests/api/test_health_endpoint.py 3/3 pass (live /health coverage restored)
  • Repo-wide: zero tracked active files reference codeframe.persistence / codeframe/persistence/
  • Cross-family review: codex + CodeRabbit (findings triaged before merge)

Known Limitations / Intentionally Deferred

  • Historical archives untouched (claudedocs/, legacydocs/, specs/, sprints/) — frozen by convention.
  • Pre-existing repo-hardening items the claude-bot flagged on PR2 (token_repository/audit_repository thread-safety, save_token_usage INSERT duplication, async PRAGMA repeated 3×) remain deferred to a separate "harden surviving repos" PR.
  • Pre-existing tests/test_new_feature.py unused-import (ruff F401) — out of scope; not introduced by this PR.

Closes #599.

Summary by CodeRabbit

  • Chores

    • Removed the built-in FastAPI server and its REST endpoints (project/agent/task management, chat) and WebSocket real-time updates.
    • Restructured the platform’s internal database/module organization.
    • Removed multiple UI and API test modules.
  • Documentation

    • Updated architecture, contribution, PRD and testing docs to reflect the platform store and new structure.

Review Change Stack

…3/3)

Final PR of issue #599. Renames the slim control-plane store to its real role,
refreshes CLAUDE.md, and removes the last v1 stragglers.

- git mv codeframe/persistence -> codeframe/platform_store (slim control-plane
  store: auth, api keys, audit logs, interactive sessions, token usage).
- Updated all 31 codeframe.persistence imports across codeframe/, tests/, and
  scripts/. Also updated active docs: CONTRIBUTING.md, PRD.md, TESTING.md, and
  the inline python check in .github/workflows/test.yml.
- CLAUDE.md: dropped the stale `codeframe/server/` references (the dir does not
  exist after the v1 cleanup): removed the "Legacy can be read" rule and the
  matching v2-architecture bullet; replaced the `server/` line in the repo
  structure tree with `platform_store/`. Refreshed the tests/agents/ note now
  that only dependency_resolver remains.
- Test stragglers (close-out cleanup):
  - Removed orphan `sample_project_config` fixture from tests/conftest.py
    (claude-bot note from PR1; zero surviving consumers).
  - Deleted the 5 remaining #597-era v1 tests that were collect-ignored and
    referenced removed code: tests/api/{test_project_creation_api,
    test_workspace_cleanup}, tests/auth/{test_api_key_endpoints,
    test_authorization_integration, test_dual_auth}.
  - Un-ignored tests/api/test_health_endpoint.py and fixed one stale v1
    assertion (`"database" in data`) — the field was removed from the v2 /health
    response; the other five assertions match the live contract and restore
    explicit /health test coverage.
  - Emptied the root tests/conftest.py collect_ignore.
  - Deleted 3 v1 ui router tests still listed in tests/ui/conftest.py
    collect_ignore (test_deployment_mode, test_project_api, test_session_router);
    left the 2 websocket entries (pre-existing, reference live kept managers).
- Deleted tracked stale coverage artifacts (codeframe/{ui/server,platform_store/
  database}.py,cover).

Historical archives (claudedocs/, legacydocs/, specs/, sprints/, testsprite_tests/)
are intentionally untouched — they are frozen point-in-time snapshots, like
docs/archive/.

Verified: pytest --collect-only clean (3460); /health 200; cf --help; ruff +
mypy clean (181 files); tests/api/test_health_endpoint.py 3/3 pass.

Closes #599.
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5cd7bc0f-8e23-47d4-96b4-255e3722d8ce

📥 Commits

Reviewing files that changed from the base of the PR and between da1dad1 and faa8c96.

📒 Files selected for processing (6)
  • PRD.md
  • codeframe/platform_store/__init__.py
  • tests/blockers/test_blocker_expiration_simple.py
  • tests/conftest.py
  • tests/lib/test_metrics_tracker.py
  • tests/ui/conftest.py
💤 Files with no reviewable changes (2)
  • tests/lib/test_metrics_tracker.py
  • tests/blockers/test_blocker_expiration_simple.py
✅ Files skipped from review due to trivial changes (1)
  • PRD.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • codeframe/platform_store/init.py
  • tests/conftest.py

Walkthrough

This PR migrates all imports and re-exports from codeframe.persistence.* to codeframe.platform_store.*, updates application modules to use the platform_store Database/repositories, and synchronizes tests, CI workflows, documentation, and audit tooling to the new paths.

Changes

Persistence → Platform Store Reorganization

Layer / File(s) Summary
Platform store module foundation
codeframe/platform_store/__init__.py, codeframe/platform_store/database.py, codeframe/platform_store/repositories/*
SchemaManager and repository imports/re-exports are redirected to codeframe.platform_store implementations; Database is exposed from codeframe.platform_store.database.
Application code migration
codeframe/auth/api_key_router.py, codeframe/auth/dependencies.py, codeframe/cli/auth_commands.py, codeframe/cli/stats_commands.py, codeframe/core/api_key_service.py, codeframe/core/react_agent.py, codeframe/lib/audit_logger.py, codeframe/lib/metrics_tracker.py, codeframe/ui/routers/costs_v2.py, codeframe/ui/server.py
Modules now import Database and repositories from codeframe.platform_store instead of codeframe.persistence; runtime logic and public signatures are unchanged.
Tests, fixtures, and collection updates
tests/conftest.py, tests/auth/*, tests/blockers/*, tests/cli/*, tests/e2e/global-setup.ts, tests/integration/conftest.py, tests/lib/*, tests/ui/conftest.py, tests/unit/*, tests/api/test_health_endpoint.py
Test modules and fixtures updated to reference codeframe.platform_store.database.Database; some UI/auth integration test modules were removed and collect_ignore lists adjusted; health test no longer asserts a top-level database field.
Documentation, CI, and tooling
.github/workflows/test.yml, CLAUDE.md, CONTRIBUTING.md, PRD.md, TESTING.md, scripts/audit_mocked_tests.py, tests/test_issues.md
CI E2E DB init commands, docs, and code examples updated to reference codeframe.platform_store.database; CLAUDE.md repository structure and rules revised; audit patterns updated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

"Rabbit's commit song:
I hopped through code and found the shore,
persistence faded, platform_store! 🐇
Imports clean, docs aligned, tests in tow,
A tidy hop — let's run the CI to glow!"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically summarizes the main change: renaming the persistence module to platform_store and removing v1 cleanup artifacts.
Linked Issues check ✅ Passed The PR successfully addresses all core coding requirements from issue #599: renames persistence→platform_store with 31 import updates, removes v1 test files and fixtures, updates CLAUDE.md, and achieves clean pytest collection and v2 test execution.
Out of Scope Changes check ✅ Passed All changes are scoped to the stated objectives: import path updates, test file removals, documentation updates, and removal of v1 infrastructure. No unrelated changes detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/issue-599-platform-store-rename

Comment @coderabbitai help to get the list of available commands and usage tips.

Address codex finding [P2]: the embedded Python invocation inside the E2E
TypeScript global-setup still imported from codeframe.persistence. My earlier
sed only touched .py and .md; .ts files with Python string literals were
missed. Without this fix the E2E backend setup would fail with
ModuleNotFoundError before any test runs.

Verified: repo-wide grep across non-historical tracked files now shows zero
codeframe.persistence references.
@frankbria

Copy link
Copy Markdown
Owner Author

Final Triage Summary (PR #604)

Cutoffs: original push 2026-05-29T20:44:53Z; codex-fix push 2026-05-29T20:46:18Z (commit da1dad1).

Review passes

  • codex (gpt-5.4, cross-family — primary): 1 finding (P2/Major) → fixed in da1dad1.
  • CodeRabbit (cross-family bot): walkthrough + automated review running on da1dad1.
  • claude-review (same-family bot, advisory): pending on da1dad1.

Fixed

  • [codex / P2] tests/e2e/global-setup.ts:59 still ran from codeframe.persistence.database import Database inside a Python invocation string — my earlier sed only touched .py and .md, missing this embedded Python in a TypeScript file. Fixed in da1dad1: the string literal now imports from codeframe.platform_store.database. Verified the repo-wide grep across all non-historical tracked files shows zero codeframe.persistence references after the fix.

Outcome

Codex's verdict was the patch is otherwise consistent; this was the only concrete regression. After fix: TRULY CLEAN — every active file uses codeframe.platform_store. Ready to merge once CI is green on da1dad1.

@claude

claude Bot commented May 29, 2026

Copy link
Copy Markdown

Code Review — PR #604 (refactor: persistence → platform_store, PR3/3)

Overview

Clean, well-scoped final PR in the #599 cleanup series. The mechanical rename from codeframe/persistence/codeframe/platform_store/ is consistent across all 31+ import sites, including the tricky embedded Python string in tests/e2e/global-setup.ts (caught and fixed by codex in da1dad1). Test cleanup (deleting 5 collect-ignored v1 files, emptying collect_ignore, restoring the health endpoint test) is the right call.

No blocking issues. Two minor items worth a quick look before merge:


Minor Issues

1. Stale module docstring in codeframe/platform_store/__init__.py

The rename left the original docstring unchanged:

"""Persistence layer for CodeFRAME state management."""

This now conflicts with the stated purpose of the module in the PR description ("slim control-plane store: auth, api keys, audit logs, interactive sessions, token usage"). A one-line update to something like:

"""Control-plane store: auth, API keys, audit logs, interactive sessions, token usage."""

…would keep the docstring consistent with the rename rationale. Low priority, but it's the most visible entry point to the module.

2. PRD.md label not updated

The path was updated correctly, but the bullet label was left as **Persistence**:

- **Persistence** (`codeframe/platform_store/database.py`) – all state with flattened v1.0 schema.

PRD.md is historical/legacy context in the repo, so this is genuinely low priority. But if the file is still read by contributors, updating to **Platform Store** keeps it aligned with the renamed module.


What Looks Good

  • Import coverage is complete — no added lines retain the old codeframe.persistence path; the grep confirms zero active references after da1dad1.
  • Collect-ignore cleanup is correct — all 5 deleted tests were depending on removed v1 code or the old import path; deleting them is cleaner than patching.
  • Health endpoint test fix is accurate — removing assert "database" in data matches the live v2 /health contract and restores real coverage.
  • tests/e2e/global-setup.ts fix — the embedded Python string update in da1dad1 is the right fix; this was a non-obvious location that wouldn't be caught by a Python-only import grep.
  • CLAUDE.md — removing the "Legacy can be read, not depended on" rule is consistent with server/ being gone; the repo-structure tree update is accurate.
  • Coverage artifacts deleted — removing database.py,cover and server.py,cover is correct hygiene; these are generated files that shouldn't be tracked.

Summary

The rename is clean and complete. The two items above are cosmetic and won't affect correctness or CI. Ready to merge once CI is green on da1dad1.

@claude

claude Bot commented May 29, 2026

Copy link
Copy Markdown

Code Review - PR 604: persistence -> platform_store rename + v1 cleanup (3/3)

Overview

This is a clean, mechanical rename PR that closes out the v1 cleanup series. The rename is comprehensive across 31 import sites, CLAUDE.md accurately reflects the new directory layout, and the test cleanup is appropriate. The acceptance criteria look satisfied from the diff.

What is Done Well

  • Complete import sweep: all 31 codeframe.persistence call sites updated with no stragglers visible in the diff.
  • CI coverage: test.yml updated in both the active DB-init step and the commented-out E2E sections.
  • test_health_endpoint.py fix: removing the stale assert "database" in data assertion and un-ignoring the file correctly restores explicit /health test coverage.
  • Stale coverage artifacts removed: codeframe/ui/server.py,cover and codeframe/platform_store/database.py,cover deletions are correct.
  • CLAUDE.md is accurate: repo-structure tree and architecture rules now match reality post-cleanup.

Minor Issues

Issue 1: Stale docstring in codeframe/platform_store/__init__.py

The module-level docstring still reads: "Persistence layer for CodeFRAME state management."

The rename captured that this is a control-plane store, not a generic persistence layer. Suggest updating to: "Platform store: control-plane state (auth, API keys, audit logs, interactive sessions, token usage)." This is the one place in the diff where the old identity still shows through.

Issue 2: Dead import guard in tests/ui/conftest.py

After deleting test_deployment_mode.py, test_project_api.py, and test_session_router.py, the import guard try/except block is now dead code -- none of the remaining tests in tests/ui/ reference Database. The stale comment label "Guard v1 import - only needed by skipped tests" also creates confusion since platform_store is the current v2 module. The whole block can be removed.

Issue 3: Section label mismatch in PRD.md (cosmetic, may be out of scope)

The PRD.md path was updated correctly, but the label was not: the bullet still reads **Persistence** (codeframe/platform_store/database.py). Flagging for awareness only since PRD.md may be intentionally left as-is.

Issue 4: Stale comment block in tests/conftest.py (cosmetic)

After emptying collect_ignore, the three comment lines above it now describe nothing. Either remove them or replace with a brief note that all v1 tests have been cleaned up.

No Blocking Issues

Nothing here blocks merge. Issues 1 and 2 are the most actionable (quick single-file edits); issues 3 and 4 are cosmetic. The rename is correct and complete.

Reviewed by claude[bot]

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/blockers/test_blocker_expiration_simple.py`:
- Line 7: The test is not marked for the v2-only CI and the swapped
platform_store.Database lacks the blocker API expected by tests; add
pytest.mark.v2 (or pytestmark = pytest.mark.v2) to
tests/blockers/test_blocker_expiration_simple.py so it runs under -m v2, and
restore the expected API on codeframe.platform_store.database by adding the
missing methods expire_stale_blockers and get_blocker (implement them as thin
wrappers or adapters that call the new underlying implementation or delegate to
the new Database internals) so the test can exercise the same identifiers it
expects while keeping the new Database structure.

In `@tests/lib/test_metrics_tracker.py`:
- Line 10: The test inserts into legacy v1 tables (projects/tasks) but only
calls Database(":memory:").initialize(), which only builds the slim
control-plane schema via SchemaManager.create_schema(), causing SQL errors; fix
by either (A) ensuring the legacy schema is created before inserts—e.g., after
Database(":memory:").initialize() invoke the schema builder that creates v1
tables (call whatever routine creates legacy tables such as
SchemaManager.create_legacy_schema() or a Database method that provisions legacy
projects/tasks) or explicitly create the projects and tasks tables in the test
setup, and (B) mark the module to run under v2 by adding pytestmark =
pytest.mark.v2 at the top of tests/lib/test_metrics_tracker.py so pytest -m v2
includes this file. Ensure changes reference Database.initialize and the
SchemaManager/legacy schema creation routine (or explicit CREATE TABLE
statements) and add the pytestmark declaration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a9db77a-dde7-4a13-b910-32322bf0e61b

📥 Commits

Reviewing files that changed from the base of the PR and between fa992f3 and da1dad1.

📒 Files selected for processing (44)
  • .github/workflows/test.yml
  • CLAUDE.md
  • CONTRIBUTING.md
  • PRD.md
  • TESTING.md
  • codeframe/auth/api_key_router.py
  • codeframe/auth/dependencies.py
  • codeframe/cli/auth_commands.py
  • codeframe/cli/stats_commands.py
  • codeframe/core/api_key_service.py
  • codeframe/core/react_agent.py
  • codeframe/lib/audit_logger.py
  • codeframe/lib/metrics_tracker.py
  • codeframe/platform_store/__init__.py
  • codeframe/platform_store/database.py
  • codeframe/platform_store/database.py,cover
  • codeframe/platform_store/repositories/__init__.py
  • codeframe/platform_store/repositories/api_key_repository.py
  • codeframe/platform_store/repositories/audit_repository.py
  • codeframe/platform_store/repositories/base.py
  • codeframe/platform_store/repositories/interactive_sessions.py
  • codeframe/platform_store/repositories/token_repository.py
  • codeframe/platform_store/schema_manager.py
  • codeframe/ui/routers/costs_v2.py
  • codeframe/ui/server.py
  • codeframe/ui/server.py,cover
  • scripts/audit_mocked_tests.py
  • tests/api/test_health_endpoint.py
  • tests/auth/test_api_key_endpoints.py
  • tests/auth/test_api_key_repository.py
  • tests/auth/test_authorization_integration.py
  • tests/auth/test_dual_auth.py
  • tests/blockers/test_blocker_expiration_simple.py
  • tests/cli/test_api_key_commands.py
  • tests/conftest.py
  • tests/e2e/global-setup.ts
  • tests/integration/conftest.py
  • tests/lib/test_metrics_tracker.py
  • tests/test_issues.md
  • tests/ui/conftest.py
  • tests/ui/test_deployment_mode.py
  • tests/ui/test_project_api.py
  • tests/ui/test_session_router.py
  • tests/unit/test_interactive_sessions_api.py
💤 Files with no reviewable changes (8)
  • tests/auth/test_authorization_integration.py
  • tests/ui/test_project_api.py
  • tests/api/test_health_endpoint.py
  • tests/ui/test_deployment_mode.py
  • tests/auth/test_dual_auth.py
  • tests/auth/test_api_key_endpoints.py
  • tests/ui/test_session_router.py
  • codeframe/ui/server.py,cover

Comment thread tests/blockers/test_blocker_expiration_simple.py Outdated
Comment thread tests/lib/test_metrics_tracker.py Outdated
CodeRabbit caught two pre-existing PR2 leftovers I missed (Major findings,
verified real — both error at fixture setup against the slimmed schema);
claude-bot raised four minor docstring/comment items.

CodeRabbit fixes (deletions):
- tests/blockers/test_blocker_expiration_simple.py: calls removed
  Database.expire_stale_blockers / get_blocker and inserts into the dropped
  projects table. 7 errors when run; deselected by -m v2 so CI stayed green.
- tests/lib/test_metrics_tracker.py: inserts into dropped projects/tasks
  tables in fixtures. 29 tests, all deselected by -m v2; MetricsTracker live
  exercise is covered by tests/core/test_react_agent_tokens.py.

claude-bot fixes (clarity):
- codeframe/platform_store/__init__.py: update docstring from "Persistence
  layer for CodeFRAME state management" to reflect the actual control-plane
  role.
- tests/ui/conftest.py: drop the dead "Guard v1 import" try/except for
  Database (the import always succeeds now); replace it with a direct import
  and tighten the comment above collect_ignore to explain what those two
  remaining entries actually are.
- tests/conftest.py: replace the stale comment block above the now-empty
  collect_ignore with a one-line note.
- PRD.md: update the bullet label from "Persistence" to "Platform store" to
  match the rename.

Skipped (claude-bot finding #2 was incorrect): "remove dead Database import
guard" is partly wrong — Database IS used at tests/ui/conftest.py:88 and
:137 (running_server fixture). Kept the import (simplified to a direct one)
instead of removing it.

Verified: ruff + mypy clean (181); pytest --collect-only clean (3424);
focused v2 sample (auth + token + interactive + health) 25/25 pass.
@frankbria

Copy link
Copy Markdown
Owner Author

Final Triage Summary (PR #604) — round 2

Cutoffs: original push 2026-05-29T20:44:53Z; codex-fix push 2026-05-29T20:46:18Z; review-fix push 2026-05-29T21:00:04Z (commit faa8c96).

Review passes

  • codex (cross-family — primary): 1 finding (P2/Major) → fixed in da1dad1.
  • CodeRabbit (cross-family bot): 2 inline Major findings → both verified real and fixed in faa8c96 (pre-existing PR2 leftovers I missed in the classification list).
  • claude-review (advisory, ran twice): 4 minor items → 3 fixed in faa8c96, 1 partly rebutted.

Fixed in faa8c96

  • [CodeRabbit / Major] tests/blockers/test_blocker_expiration_simple.py calls removed Database.expire_stale_blockers / get_blocker and inserts into the dropped projects table — verified 7 errors when run; deleted (deselected by -m v2, so CI green was misleading).
  • [CodeRabbit / Major] tests/lib/test_metrics_tracker.py inserts into dropped projects/tasks tables in fixtures — 29 tests, all deselected by -m v2; deleted. Live MetricsTracker coverage remains via tests/core/test_react_agent_tokens.py (v2-marked).
  • [claude / minor] Stale codeframe/platform_store/__init__.py docstring updated to reflect the control-plane role.
  • [claude / minor] tests/ui/conftest.py dead try/except Database import guard replaced with a direct import; collect_ignore comment tightened.
  • [claude / minor] tests/conftest.py stale comment block above the now-empty collect_ignore replaced with a one-line note.
  • [claude / cosmetic] PRD.md bullet label changed "Persistence" → "Platform store".

Skipped (with one-line justification)

  • [claude / minor — partly rebutted] "Remove dead Database import guard from tests/ui/conftest.py" — Database is in fact used at lines 88 and 137 (running_server fixture). Kept the import (now a direct import) instead of removing it.

Outcome

No unresolved Critical/Major findings. After fixes: ruff + mypy clean (181 files); collect-only clean (3424); focused v2 sample (auth + token + interactive + health) 25/25 pass. Ready to merge once CI is green on faa8c96.

@claude

claude Bot commented May 29, 2026

Copy link
Copy Markdown

Follow-up Review — PR #604 (da1dad1)

Picking up from my prior review and frankbria's triage summary. Both open items are closed.

Items Resolved

1. Module docstring (flagged in prior review)
codeframe/platform_store/__init__.py correctly reads:

"""Platform store: control-plane state (auth, API keys, audit logs, interactive sessions, token usage)."""

This was accurate as shipped — no follow-up needed.

2. TypeScript embedded Python string (codex P2, fixed in da1dad1)
tests/e2e/global-setup.ts:59 now imports from codeframe.platform_store.database. The repo-wide grep confirmed zero remaining codeframe.persistence references in active tracked files.

Current State: Clean

  • All 31+ import sites updated consistently
  • collect_ignore emptied; deleted 5 orphaned v1 test files
  • Health endpoint test restored with corrected assertion ("database" in data removed to match live v2 contract)
  • CLAUDE.md refreshed: server/ legacy rule removed, repo-structure tree updated, agents/ note narrowed to dependency_resolver

One Observation (Non-blocking)

TESTING.md still contains examples referencing LeadAgent and codeframe.agents.lead_agent — classes removed in PR1/PR2. The import paths were updated here, but the surrounding code examples are now aspirational fiction. This predates this PR and is out of scope for a rename-only change, but worth a dedicated pass in a follow-up doc cleanup.


Verdict: ready to merge once CI is green on da1dad1. The rename is complete and consistent.

@frankbria frankbria merged commit eb760ab into main May 29, 2026
11 checks passed
@frankbria frankbria deleted the refactor/issue-599-platform-store-rename branch May 29, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove remaining v1 infrastructure: domain cluster, Database slim, persistence→platform_store rename

1 participant